package com.example.hello.common;

import java.util.List;

/**
 * 分页结果类
 */
public class PageResult<T> {
    
    private Long total;
    private List<T> rows;
    
    // 构造函数
    public PageResult() {}
    
    public PageResult(Long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }
    
    // Getter和Setter方法
    public Long getTotal() {
        return total;
    }
    
    public void setTotal(Long total) {
        this.total = total;
    }
    
    public List<T> getRows() {
        return rows;
    }
    
    public void setRows(List<T> rows) {
        this.rows = rows;
    }
    
    @Override
    public String toString() {
        return "PageResult{" +
                "total=" + total +
                ", rows=" + rows +
                '}';
    }
}





